﻿// See https://aka.ms/new-console-template for more information
public class Person
{
    public string Name { get; set; }
    public int Age { get; set; }

    public Person()
    {
    }

    public Person(string name, int age)
    {
        Name = name;
        Age = age;
    }
}
class Program
{
    public static void Main(string[] args)
    {
        Type t = typeof(Person);
        Type[] paramTypes = new Type[2] { typeof(string),typeof(int) };
        var info = t.GetConstructor(paramTypes);
        object[] param = new object[2] { "Alice", 18 };

        var o = info.Invoke(param);
        Console.WriteLine(((Person)o).Name+" "+((Person)o).Age);
    }
}

